//
//  CalendarEventView.m
//  BiMATRIX
//
//  Created by wenhe on 15/3/3.
//  Copyright (c) 2015年 上海文和信息技术有限公司. All rights reserved.
//

#import "CalendarEventView.h"

@implementation CalendarEventView

/*
// Only override drawRect: if you perform custom drawing.
// An empty implementation adversely affects performance during animation.
- (void)drawRect:(CGRect)rect {
    // Drawing code
}
*/

-(void)setTitle:(NSString *)title
{
    self.backgroundColor = [UIColor colorWithRed:0 green:146/255.0 blue:222/255.0 alpha:0.7];
    self.layer.cornerRadius = 4.5;
    self.layer.masksToBounds = YES;
    
    UIView* gView = [[UIView alloc]initWithFrame:CGRectMake(4, 4, 5, 5)];
    gView.backgroundColor = [UIColor greenColor];
    gView.layer.cornerRadius = 2.5;
    gView.layer.masksToBounds = YES;
    [self addSubview:gView];
    
    UILabel* label = [[UILabel alloc]initWithFrame:CGRectMake(15, 0, self.frame.size.width - 15, 13)];
    label.text = title;
    label.font = [UIFont fontWithName:@"Helvetica-Bold" size:12];
    label.textColor = [UIColor whiteColor];
    [self addSubview:label];
}

@end
